//
//  NetRequest+user.h
//  DogeLegs
//
//  Created by 宋华 on 2017/8/17.
//  Copyright © 2017年 宋华. All rights reserved.
//

#import "NetRequest.h"
#import "UserMode.h"

@interface NetRequest (user)

/**
 *  用户注册
 *
 *  @param params  注册的参数
 *  @param success 成功后的回调
 *  @param fail    失败后的回调
 *
 *  @return 会话任务
 */
- (NSURLSessionDataTask *)registDictionary:(NSDictionary *)params
                                  success:(void (^)(UserMode *user))success
                                     fail:(void (^)(RequestError *error))fail;

/**
 *  用户登录
 *
 *  @param params  登录的参数
 *  @param success 成功后的回调
 *  @param fail    失败后的回调
 *
 *  @return 会话任务
 */
- (NSURLSessionDataTask *)loginDictionary:(NSDictionary *)params
                                  success:(void (^)(UserMode *user))success
                                     fail:(void (^)(RequestError *error))fail;


/*
 @brief 登出
 @param success 成功回调
 @param fail 失败回调
 */
- (NSURLSessionDataTask *)loginOutDictionary:(NSDictionary *)params
                                     success:(void (^)(BOOL isSucess))success
                                        fail:(void (^)(NSString *error))fail;


/*
 @brief 获取验证码
 @param success 成功回调
 @param fail 失败回调
 */
- (NSURLSessionDataTask *)getVerificationCodeDictionary:(NSDictionary *)params
                                                success:(void (^)(BOOL isSucess))success
                                                   fail:(void (^)(RequestError *error))fail;
/*
 @brief 修改消费者个人资料
 @param success 成功回调
 @param fail 失败回调
 */
- (NSURLSessionDataTask *)modifyUserInfoDictionary:(NSDictionary *)params
                                           success:(void (^)(BOOL isSucess))success
                                              fail:(void (^)(NSString *error))fail;

/*
 @brief 反馈意见
 @param success 成功回调
 @param fail 失败回调
 */
- (NSURLSessionDataTask *)feedBackDictionary:(NSDictionary *)params
                                     success:(void (^)(BOOL isSucess))success
                                        fail:(void (^)(RequestError *error))fail;


@end
